﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace RainyPWS.Common
{
    public class StaticVar
    {
        public static readonly string ConnectionString = ConfigurationManager.ConnectionStrings["RainyPWS"].ConnectionString;
        public const int MaxPageCount = 9999;
        
    }

    public struct CommentType
    {
        public  const int RECORD = 1;
        public  const int TOOL = 2;
        public  const int GAME = 3;
    }

    public struct RecordStatus
    {
        public const int All = -1;
        public const int Ready = 0;
        public const int Published = 1;
        public const int Deleted = 2;

        public static string GetStatusName(int status)
        {
            switch (status)
            {
                case Ready:
                    return "<font color=\"blue\">草稿</font>";
                case Published:
                    return "<font color=\"green\">已发布</font>";
                case Deleted:
                    return "<font color=\"red\">已删除</font>";
                default:
                    return "<font color=\"blue\">草稿</font>";
            }
        }
    }

    public enum PagerCommandType
    {
        First,
        Prev,
        Next,
        Last,
        Refresh,
        Num
    }
}
